package com.jichangxiu.common.entity.vo;

import cn.hutool.core.util.ObjectUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * BaseQueryVo:
 *
 * @author Jcx
 * @create 2023-04-03 21:49
 */
@Data
public class BaseQueryVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "当前页")
    private Integer pageNum;

    @Schema(description = "每页条数")
    private Integer pageSize;

    private Map<String, Object> params;

    public Map<String, Object> getParams() {
        if (ObjectUtil.isEmpty(params)) {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }

}
